/*
 * @Author: WangZhongDe
 * @Date: 2021-08-28 23:08:33
 * @LastEditors: WangZhongDe
 * @LastEditTime: 2021-08-28 23:17:40
 * @FilePath: \rust\learn5\src\main.rs
 */
struct Point<T>{
    x:T,
    y:T,
  }
  impl<T> Point<T>{
    fn x(&self)->&T{
      &self.x
    }
    fn y(&self)->&T{
        &self.y
    }
  }
fn main() {
    let p = Point{x:10,y:20};
    let f = Point{x:2.3,y:4.5};
    println!("{},{}",p.x(),f.y())
}
